package com.itbaizhan.service;

import com.itbaizhan.api.AddUserService;
import com.itbaizhan.mapper.UserMapper;
import com.itbaizhan.pojo.User;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service  //引入dobuu类的service,而不是springboot
public class AddUserServiceImpl implements AddUserService {

    /*操作数据库*/
    @Autowired
    private UserMapper userMapper;
    @Override
    public int addUser(User user) {
        /*返回值是int类型*/
        return userMapper.insert(user);
    }
}
